<template>
  <main>
    <p>this is home-msg: {{ msg }}</p>
    <button @click="msgHandle">Change</button>
  </main>
</template>

<script setup lang="ts">
import { ref, watch } from 'vue'

const msg = ref('home')

watch(msg, (newVal, oldVal) => {
  console.log(msg)
  debugger
})
const msgHandle = () => {
  msg.value = 'home-change'
}
</script>
